package simuAnnealing;

import parser.FloorPlan;

public class Solution {

	private FloorPlan initialSolution;
	private SimulatedAnnealing simulatedAnnealingAlg = null;
	private SAconfigurations simulatedConfigurations;

	public enum alogrithmToUse {
		SIMULATED_ANNEALING
	};

	private alogrithmToUse type;

	public Solution(FloorPlan init, Solution.alogrithmToUse type,
			SAconfigurations config) {

		this.setAlgType(type);
		this.setInitialSolution(init);
		this.simulatedConfigurations = config;
		simulatedAnnealingAlg = new SimulatedAnnealing();
	}


	public void executeSA(){
		if(simulatedAnnealingAlg == null)
			return;
		
		simulatedAnnealingAlg.executeAlgorithm(initialSolution.clone(),
				simulatedConfigurations);
	}
	
	public SAconfigurations getSimulatedConfigurations() {
		return simulatedConfigurations;
	}

	public SimulatedAnnealing getSimulatedAnnealingAlg() {
		return simulatedAnnealingAlg;
	}

	public void setSimulatedAnnealingAlg(
			SimulatedAnnealing simulatedAnnealingAlg) {
		this.simulatedAnnealingAlg = simulatedAnnealingAlg;
	}

	public FloorPlan getInitialSolution() {
		return initialSolution;
	}

	public void setInitialSolution(FloorPlan initialSolution) {
		this.initialSolution = initialSolution;
	}

	public alogrithmToUse getAlgType() {
		return type;
	}

	public void setAlgType(alogrithmToUse type) {
		this.type = type;
	}
}
